<template>
  <div class="notice web-box">
    <div class="operate-bar">
      <el-button color="#337ECC" size="small">发公告</el-button>
      <el-button color="#337ECC" size="small" plain>删除</el-button>
    </div>
    <div class="cont-table">
      <el-table :data="tableData" border stripe height="650px" class="custom-table">
        <el-table-column type="selection" width="40" />
        <template v-for="(item, index) in tabHeading">
          <el-table-column show-overflow-tooltip :prop="item.prop" :label="item.label" :width="item.width"
            :min-width="item.minWidth" />
        </template>
        <el-table-column fixed="right" label="操作" min-width="100">
          <template #default="{ row }">
            <el-button link type="primary" size="small">查看</el-button>
            <el-button link type="primary" size="small">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <div class="footer_pag">
      <el-pagination v-model:current-page="currentPage" :page-size="pageSize" :page-sizes="pageSizes" background
        size="small" layout="->,total, prev, pager, next,sizes" :total="total" @size-change="handleSizeChange"
        @current-change="handleCurrentChange" />
    </div>
  </div>
</template>

<script setup>
const pageSize = ref(50)
const pageSizes = ref([50, 100, 200, 300, 400])
const currentPage = ref()
const total = ref(400)
// 表头
const tabHeading = ref([
  { prop: "name", label: "公告内容", width: "", minWidth: "", },
  { prop: "no", label: "接收人", width: "", minWidth: "", },
  { prop: "money", label: "发布时间", width: "", minWidth: "", },
])
// 列表数据
const tableData = ref(Array.from({ length: 30 }, (_, i) => ({
  num: `文件${i + 1}`,
  name: `${Math.floor(Math.random() * 1000)}MB`,
  no: ['文档', '图片', '视频', '压缩包'][i % 4],
  money: `用户${i % 10}`,
  payment: new Date().toLocaleString()
})))
const handleSizeChange=()=>{}
const handleCurrentChange=()=>{}
</script>

<style lang="less" scoped>
@import "@/assets/scss/web.scss";
</style>